package com.soft.entity;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 实体：评论（表 comment）
 * 描述：采用多态关联（relatedType+relatedId）指向工作日志或日程；支持自引用回复（replyTo）。
 */
@TableName("comment")
public class Comment {
     // 主键，自增
    @TableId(type = IdType.AUTO)
    private Integer commentId;
    
     // 关联类型：schedule/worklog
    private String relatedType; // schedule/worklog
    
     // 关联主键 ID
    private Integer relatedId;
    
     // 创建者用户 ID
    private Integer creatorId;
    
     // 内容（已过滤敏感词）
    private String content;
    
     // 原始评论内容（未过滤敏感词）
    private String originalContent; // 原始评论内容（未过滤敏感词）
    
     // 回复目标评论 ID（自引用），为空表示顶级评论
    private Integer replyTo;
    
     // 创建时间
    private LocalDateTime createTime;

    public Integer getCommentId() {
        return commentId;
    }

    public void setCommentId(Integer commentId) {
        this.commentId = commentId;
    }

    public String getRelatedType() {
        return relatedType;
    }

    public void setRelatedType(String relatedType) {
        this.relatedType = relatedType;
    }

    public Integer getRelatedId() {
        return relatedId;
    }

    public void setRelatedId(Integer relatedId) {
        this.relatedId = relatedId;
    }

    public Integer getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(Integer creatorId) {
        this.creatorId = creatorId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getOriginalContent() {
        return originalContent;
    }

    public void setOriginalContent(String originalContent) {
        this.originalContent = originalContent;
    }

    public Integer getReplyTo() {
        return replyTo;
    }

    public void setReplyTo(Integer replyTo) {
        this.replyTo = replyTo;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
}
